home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / Libraries / DCLAP 6d / dclap6d / network / ncsasock / s_compat.h < prev    next >
Text File  |  1996-07-05  |  6KB  |  150 lines

  1. /*
  2.  * Copyright (c) 1990 The Regents of the University of California.
  3.  * All rights reserved.
  4.  *
  5.  * Redistribution is only permitted until one year after the first shipment
  6.  * of 4.4BSD by the Regents.  Otherwise, redistribution and use in source and
  7.  * binary forms are permitted provided that: (1) source distributions retain
  8.  * this entire copyright notice and comment, and (2) distributions including
  9.  * binaries display the following acknowledgement:  This product includes
  10.  * software developed by the University of California, Berkeley and its
  11.  * contributors'' in the documentation or other materials provided with the
  12.  * distribution and in all advertising materials mentioning features or use
  13.  * of this software.  Neither the name of the University nor the names of
  14.  * its contributors may be used to endorse or promote products derived from
  15.  * this software without specific prior written permission.
  16.  * THIS SOFTWARE IS PROVIDED AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
  17.  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
  18.  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  19.  *
  20.  *    @(#)ioctl_compat.h    7.3 (Berkeley) 5/16/90
  21.  */
  22.  
  23. #ifdef KERNEL
  24. #include "ttychars.h"
  25. #include "ttydev.h"
  26. #else
  27. #include <sys/ttychars.h>
  28. #include <sys/ttydev.h>
  29. #endif
  30.  
  31. struct tchars {
  32.     char    t_intrc;    /* interrupt */
  33.     char    t_quitc;    /* quit */
  34.     char    t_startc;    /* start output */
  35.     char    t_stopc;    /* stop output */
  36.     char    t_eofc;        /* end-of-file */
  37.     char    t_brkc;        /* input delimiter (like nl) */
  38. };
  39.  
  40. struct ltchars {
  41.     char    t_suspc;    /* stop process signal */
  42.     char    t_dsuspc;    /* delayed stop process signal */
  43.     char    t_rprntc;    /* reprint line */
  44.     char    t_flushc;    /* flush output (toggles) */
  45.     char    t_werasc;    /* word erase */
  46.     char    t_lnextc;    /* literal next character */
  47. };
  48.  
  49. /*
  50.  * Structure for TIOCGETP and TIOCSETP ioctls.
  51.  */
  52. #ifndef _SGTTYB_
  53. #define    _SGTTYB_
  54. struct sgttyb {
  55.     char    sg_ispeed;        /* input speed */
  56.     char    sg_ospeed;        /* output speed */
  57.     char    sg_erase;        /* erase character */
  58.     char    sg_kill;        /* kill character */
  59.     short    sg_flags;        /* mode flags */
  60. };
  61. #endif
  62.  
  63. #ifdef USE_OLD_TTY
  64. # undef  TIOCGETD
  65. # define TIOCGETD    _IOR('t', 0, int)    /* get line discipline */
  66. # undef  TIOCSETD
  67. # define TIOCSETD    _IOW('t', 1, int)    /* set line discipline */
  68. #else
  69. # define OTIOCGETD    _IOR('t', 0, int)    /* get line discipline */
  70. # define OTIOCSETD    _IOW('t', 1, int)    /* set line discipline */
  71. #endif
  72. #define    TIOCHPCL    _IO('t', 2)        /* hang up on last close */
  73. #define    TIOCGETP    _IOR('t', 8,struct sgttyb)/* get parameters -- gtty */
  74. #define    TIOCSETP    _IOW('t', 9,struct sgttyb)/* set parameters -- stty */
  75. #define    TIOCSETN    _IOW('t',10,struct sgttyb)/* as above, but no flushtty*/
  76. #define    TIOCSETC    _IOW('t',17,struct tchars)/* set special characters */
  77. #define    TIOCGETC    _IOR('t',18,struct tchars)/* get special characters */
  78. #define        TANDEM        0x00000001    /* send stopc on out q full */
  79. #define        CBREAK        0x00000002    /* half-cooked mode */
  80. #define        LCASE        0x00000004    /* simulate lower case */
  81. #define        ECHO        0x00000008    /* echo input */
  82. #define        CRMOD        0x00000010    /* map \r to \r\n on output */
  83. #define        RAW        0x00000020    /* no i/o processing */
  84. #define        ODDP        0x00000040    /* get/send odd parity */
  85. #define        EVENP        0x00000080    /* get/send even parity */
  86. #define        ANYP        0x000000c0    /* get any parity/send none */
  87. #define        NLDELAY        0x00000300    /* \n delay */
  88. #define            NL0    0x00000000
  89. #define            NL1    0x00000100    /* tty 37 */
  90. #define            NL2    0x00000200    /* vt05 */
  91. #define            NL3    0x00000300
  92. #define        TBDELAY        0x00000c00    /* horizontal tab delay */
  93. #define            TAB0    0x00000000
  94. #define            TAB1    0x00000400    /* tty 37 */
  95. #define            TAB2    0x00000800
  96. #define        XTABS        0x00000c00    /* expand tabs on output */
  97. #define        CRDELAY        0x00003000    /* \r delay */
  98. #define            CR0    0x00000000
  99. #define            CR1    0x00001000    /* tn 300 */
  100. #define            CR2    0x00002000    /* tty 37 */
  101. #define            CR3    0x00003000    /* concept 100 */
  102. #define        VTDELAY        0x00004000    /* vertical tab delay */
  103. #define            FF0    0x00000000
  104. #define            FF1    0x00004000    /* tty 37 */
  105. #define        BSDELAY        0x00008000    /* \b delay */
  106. #define            BS0    0x00000000
  107. #define            BS1    0x00008000
  108. #define        ALLDELAY    (NLDELAY|TBDELAY|CRDELAY|VTDELAY|BSDELAY)
  109. #define        CRTBS        0x00010000    /* do backspacing for crt */
  110. #define        PRTERA        0x00020000    /* \ ... / erase */
  111. #define        CRTERA        0x00040000    /* " \b " to wipe out char */
  112. #define        TILDE        0x00080000    /* hazeltine tilde kludge */
  113. #define        MDMBUF        0x00100000    /*start/stop output on carrier*/
  114. #define        LITOUT        0x00200000    /* literal output */
  115. #define        TOSTOP        0x00400000    /*SIGSTOP on background output*/
  116. #define        FLUSHO        0x00800000    /* flush output to terminal */
  117. #define        NOHANG        0x01000000    /* (no-op) was no SIGHUP on carrier drop */
  118. #define        L001000        0x02000000
  119. #define        CRTKIL        0x04000000    /* kill line with " \b " */
  120. #define        PASS8        0x08000000
  121. #define        CTLECH        0x10000000    /* echo control chars as ^X */
  122. #define        PENDIN        0x20000000    /* tp->t_rawq needs reread */
  123. #define        DECCTQ        0x40000000    /* only ^Q starts after ^S */
  124. #define        NOFLSH        0x80000000    /* no output flush on signal */
  125. #define    TIOCLBIS    _IOW('t', 127, int)    /* bis local mode bits */
  126. #define    TIOCLBIC    _IOW('t', 126, int)    /* bic local mode bits */
  127. #define    TIOCLSET    _IOW('t', 125, int)    /* set entire local mode word */
  128. #define    TIOCLGET    _IOR('t', 124, int)    /* get local modes */
  129. #define        LCRTBS        (CRTBS>>16)
  130. #define        LPRTERA        (PRTERA>>16)
  131. #define        LCRTERA        (CRTERA>>16)
  132. #define        LTILDE        (TILDE>>16)
  133. #define        LMDMBUF        (MDMBUF>>16)
  134. #define        LLITOUT        (LITOUT>>16)
  135. #define        LTOSTOP        (TOSTOP>>16)
  136. #define        LFLUSHO        (FLUSHO>>16)
  137. #define        LNOHANG        (NOHANG>>16)
  138. #define        LCRTKIL        (CRTKIL>>16)
  139. #define        LPASS8        (PASS8>>16)
  140. #define        LCTLECH        (CTLECH>>16)
  141. #define        LPENDIN        (PENDIN>>16)
  142. #define        LDECCTQ        (DECCTQ>>16)
  143. #define        LNOFLSH        (NOFLSH>>16)
  144. #define    TIOCSLTC    _IOW('t',117,struct ltchars)/* set local special chars*/
  145. #define    TIOCGLTC    _IOR('t',116,struct ltchars)/* get local special chars*/
  146. #define OTIOCCONS    _IO('t', 98)    /* for hp300 -- sans int arg */
  147. #define    OTTYDISC    0
  148. #define    NETLDISC    1
  149. #define    NTTYDISC    2
  150.